import Vue from 'vue';
import Router from 'vue-router';
import Home from '@/views/Home.vue';
import EmployeeList from '@/views/EmployeeList.vue';
import LeaveApplication from '@/views/LeaveApplication.vue';
import EmployeeAndSalaryInfo from '@/views/EmployeeAndSalaryInfo.vue';
import LeaveInfo from '@/views/LeaveInfo.vue';

Vue.use(Router);

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/employees',
      name: 'EmployeeList',
      component: EmployeeList
    },
    {
      path: '/leave-application',
      name: 'LeaveApplication',
      component: LeaveApplication
    },
    {
      path: '/employee-and-salary/:employeeId',
      name: 'EmployeeAndSalaryInfo',
      component: EmployeeAndSalaryInfo,
      props: true
    },
    {
      path: '/leave/:employeeId',
      name: 'LeaveInfo',
      component: LeaveInfo,
      props: true
    }
  ]
});
